package com.itheima.blog.web.controller;

import com.itheima.api.client.AdminClient;
import com.itheima.api.client.dto.TagDto;
import com.itheima.common.domain.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class WebTagController {

    @Autowired
    private AdminClient adminClient;

    @GetMapping("/tag/list")
    public R tagList(){
        List<TagDto> tagList = adminClient.getTagList();
        return R.ok(tagList);
    }
}
